package controllers.chat;

/**
 * @author Konovalov_Nik
 */
public class IdPair {
    public long uid;
    public long chatId;

    public IdPair(long uid, long chatId) {
        this.uid = uid;
        this.chatId = chatId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IdPair idPair = (IdPair) o;

        if (chatId != idPair.chatId) return false;
        if (uid != idPair.uid) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (uid ^ (uid >>> 32));
        result = 31 * result + (int) (chatId ^ (chatId >>> 32));
        return result;
    }
}
